package a.f.l;

import a.c.d;
import a.f.ad;
import a.i.l;

import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;

class jb
  implements Comparator
{
  private static final int a = -128;
  private static final int c = -64;
  private static final int d = -16;
  private static final int e = -4;
  private static final int f = -1;
  private static final int g = 0;
  private a.f.o h;
  private g i;
  
  public jb(a.f.o paramo, g paramg)
  {
    this.h = paramo;
    this.i = paramg;
  }
  
  public int compare(Object paramObject1, Object paramObject2)
  {
    return l.a(a((d)paramObject1), a((d)paramObject2));
  }
  
  private int a(d paramd)
  {
    int k = g.Cc;
    int j = 0;
    if (k == 0) {
      if (this.i.d(paramd.e()))
      {
        j -= 128;
        if (k != 0) {
          break label91;
        }
        if (g.Bc == 0) {
          break label58;
        }
      }
    }
    if (k == 0)
    {
      if (this.i.d(paramd.f())) {
        j -= 64;
      }
      label58:
      j += a(o.a(this.h, paramd, true));
      j += a(o.a(this.h, paramd, false));
    }
    label91:
    return j;
  }
  
  private int a(Collection paramCollection)
  {
    int n = g.Cc;
    int m = g.Bc;
    int j = 0;
    if (((n != 0) || (paramCollection != null)) && ((n != 0) || (!paramCollection.isEmpty())))
    {
      Iterator localIterator = paramCollection.iterator();
      label102:
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        ad localad = (ad)localIterator.next();
        int k = 0;
        if (m != 0) {
          break label178;
        }
        if (localad.b())
        {
          k = -16;
          if (n != 0) {
            break label102;
          }
          if (m == 0) {}
        }
        else
        {
          k = -4;
        }
        if (n == 0) {
          if (localad.a(1)) {
            k++;
          }
        }
        if (n == 0) {
          if (localad.a(2)) {
            k++;
          }
        }
        if (n == 0) {
          if (localad.a(8)) {
            k++;
          }
        }
        if (n == 0)
        {
          if (localad.a(4)) {
            k++;
          }
          j = Math.min(k, j);
        }
      } while (m == 0);
    }
    label178:
    return j;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.jb

 * JD-Core Version:    0.7.0.1

 */